import rental.NewMovieClassification;
import junit.framework.TestCase;


public class TestNewMovieClassification extends TestCase {

	NewMovieClassification newMovie;
	
	protected void setUp() throws Exception {
		newMovie = new NewMovieClassification();
	}
	
	public void testGetPriceCode() {
		assertEquals(1, newMovie.getPriceCode());
		NewMovieClassification new2 = new NewMovieClassification();
		assertEquals(1, new2.getPriceCode());
	}
	
	public void testGetRentValue1(){
		assertEquals(3.0, newMovie.getRentValue(1));
		assertEquals(9.0, newMovie.getRentValue(3));
		assertEquals(15.0, newMovie.getRentValue(5));
		assertEquals(30.0, newMovie.getRentValue(10));
		assertEquals(300.0, newMovie.getRentValue(100));
		assertEquals(3000.0, newMovie.getRentValue(1000));
	}

	public void testGetMsg() {
		assertEquals("This is a new movie. " +
				"Please check the classification in the back cover.", newMovie.getMsg());
	}

	public void testGetProgramPoints(){
		assertEquals(1, newMovie.getProgramPoints(1));
		NewMovieClassification new2 = new NewMovieClassification();
		assertEquals(1, new2.getProgramPoints(1));
		assertEquals(2, new2.getProgramPoints(2));
		assertEquals(2, new2.getProgramPoints(5));
		assertEquals(2, new2.getProgramPoints(10));
		assertEquals(2, new2.getProgramPoints(100));
		assertEquals(2, new2.getProgramPoints(1000));
	}

}
